﻿using MovingChameLibrary.Models;
using MovingChameLibrary.Models.Action;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MovingChameLibrary.DataManager
{
    public class TourGroupData
    {
        private static TourGroupData current;
        public static TourGroupData Current
        {
            get
            {
                if (current == null)
                    current = new TourGroupData();
                return current;
            }
        }

        private TourGroup _newestGroup;
        public TourGroup NewestGroup
        {
            get
            {
                if (_newestGroup == null)
                    _newestGroup = new TourGroup(Constants.NewestTourId, Constants.NewestTourTitle);
                return this._newestGroup;
            }
        }

        private TourGroup _hottestGroup;
        public TourGroup HottestGroup
        {
            get
            {
                if (_hottestGroup == null)
                    _hottestGroup = new TourGroup(Constants.HottestTourId, Constants.HottestTourTitle);
                return this._hottestGroup;
            }
        }

        private TourGroup _suitableGroup;
        public TourGroup SuitableGroup
        {
            get
            {
                if (_suitableGroup == null)
                    _suitableGroup = new TourGroup(Constants.SuitableTourId, Constants.SuitableTourTitle);
                return this._suitableGroup;
            }
        }

        private TourGroup _cheapestGroup;
        public TourGroup CheapestGroup
        {
            get
            {
                if (_cheapestGroup == null)
                    _cheapestGroup = new TourGroup(Constants.CheapestTourId, Constants.CheapestTourTitle);
                return this._cheapestGroup;
            }
        }

        private TourGroup _friendGroup;
        public TourGroup FriendGroup
        {
            get
            {
                if (_friendGroup == null)
                    _friendGroup = new TourGroup(Constants.FriendTourId, Constants.FriendTourTitle);
                return this._friendGroup;
            }
        }

        private TourGroup _suggestGroup;
        public TourGroup SuggestGroup
        {
            get
            {
                if (_suggestGroup == null)
                    _suggestGroup = new TourGroup(Constants.SuggestionTourId, Constants.SuggestionTourTitle);
                return this._suggestGroup;
            }
        }

        private TourGroup _previousGroup;
        public TourGroup PreviousGroup
        {
            get
            {
                if (_previousGroup == null)
                    _previousGroup = new TourGroup(Constants.PreviousTourId, Constants.PreviousTourTitle);
                return this._previousGroup;
            }
        }

        private TourGroup _confirmedGroup;
        public TourGroup ConfirmedGroup
        {
            get
            {
                if (_confirmedGroup == null)
                    _confirmedGroup = new TourGroup(Constants.ConfirmedTourId, Constants.ConfirmedTourTitle);
                return this._confirmedGroup;
            }
        }

        private TourGroup _favouriteGroup;
        public TourGroup FavouriteGroup
        {
            get
            {
                if (_favouriteGroup == null)
                    _favouriteGroup = new TourGroup(Constants.FavouriteTourId, Constants.FavouriteTourTitle);
                return this._favouriteGroup;
            }
        }

        private TourGroup _sharedGroup;
        public TourGroup SharedGroup
        {
            get
            {
                if (_sharedGroup == null)
                    _sharedGroup = new TourGroup(Constants.SharedTourId, Constants.SharedTourTitle);
                return this._sharedGroup;
            }
        }

        private TourGroup _creatingGroup;
        public TourGroup CreatingGroup
        {
            get
            {
                if (_creatingGroup == null)
                {
                    _creatingGroup = new TourGroup(Constants.CreatingTourId, Constants.CreatingTourTitle);
                    _creatingGroup.Items.Add(new CreateTourItem());
                }
                return this._creatingGroup;
            }
        }

        private TourGroup _officialSearchResultGroup;
        public TourGroup OfficialSearchResultGroup
        {
            get
            {
                if (_officialSearchResultGroup == null)
                    _officialSearchResultGroup = new TourGroup(Constants.OfficialSearchResultGroupId, Constants.OfficialSearchResultGroupTitle);
                return this._officialSearchResultGroup;
            }
        }

        private TourGroup _userMadeSearchResultGroup;
        public TourGroup UserMadeSearchResultGroup
        {
            get
            {
                if (_userMadeSearchResultGroup == null)
                    _userMadeSearchResultGroup = new TourGroup(Constants.UserMadeSearchResultGroupId, Constants.UserMadeSearchResultGroupTitle);
                return this._userMadeSearchResultGroup;
            }
        }
    }
}